﻿using EPiServer;
using EPiServer.DynamicContent;

namespace SocialPack.modules.SocialPack.DynamicContent.Linkedin
{
    [DynamicContentPlugIn(
        DisplayName = "Linkedin Company Insider",
        Description = "Displays Linkedin Company Insider",
        ViewUrl = "~/modules/socialpack/dynamiccontent/linkedin/CompanyInsider.ascx")]
    public partial class CompanyInsider : UserControlBase
    {
        public string CompanyId { get; set; }

        public string Modules { get; set; }

        protected override void OnLoad(System.EventArgs e)
        {
            base.OnLoad(e);

            if (!string.IsNullOrWhiteSpace(this.CompanyId))
            {
                this.CompanyInsiderControl.CompanyId = this.CompanyId;
            }

            if (!string.IsNullOrWhiteSpace(this.Modules))
            {
                this.CompanyInsiderControl.Modules = this.Modules;
            }
        }
    }
}